﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using THSLib;
using System.Reflection;
using THSERP.BusinessEntities;
namespace THSERP.BaseProvider
{
    public partial class guiSearch : DevExpress.XtraEditors.XtraForm
    {
        private BaseModuleERP _module;
        private String _objectSearchName;
        private String _searchControlName;
        private String _CurTable;
        private BaseSearchObject _searchObject;
        private int lastresultcount;
        public static int DefaultTopResults = 10000;
        private int CountvisibleColumns = 0;
        private Boolean ModusEnter = true;
        private System.Collections.Specialized.ListDictionary filterDic;
        private Boolean OpenFirst = true;
        private String _Vorgabe = "";

        #region Constructor
        public guiSearch()
        {
            InitializeComponent();
        }

        public guiSearch(BaseModuleERP currentModule, String strObjectSearchName, String strSearchControlName, String strVorgabe)
        {

            InitializeComponent();
            _module = currentModule;
            ObjectSearchName = strObjectSearchName;
            SearchControlName = strSearchControlName;
            SetSearchObject();
            AddAllColumnsToGridViewResults(fld_dgvSearchResults, ObjectSearchName);
            GetCustomizeColumns();
            _Vorgabe = strVorgabe;
            fld_txt_maxCount.Text = DefaultTopResults.ToString();
        }
        
        #endregion

        #region Public Properties
        public BaseModuleERP Module
        {
            get
            {
                return _module;
            }
            set
            {
                _module = value;
            }
        }

        public String ObjectSearchName
        {
            get
            {
                return _objectSearchName;
            }
            set
            {
                _objectSearchName = value;
            }
        }

        public String SearchControlName
        {
            get
            {
                return _searchControlName;
            }
            set
            {
                _searchControlName = value;
            }
        }

        public BaseSearchObject SearchObject
        {
            get
            {
                return _searchObject;
            }
            set
            {
                _searchObject = value;
            }
        }


        #endregion

        #region Init Search Result Grid
        private void SetSearchObject()
        {
            String strModuleName = THSUtil.GetModuleName(ObjectSearchName);
            SearchObject = BaseSearchObjectFactory.GetSearchObject(strModuleName);
            _CurTable = strModuleName;            

            return;
        }

        private void GetCustomizeColumns()
        {

            STGridResultColumnDisplaysController objGridResultColumnDisplayController = new STGridResultColumnDisplaysController();
            //if (objGridResultColumnDisplayController.IsExist(strModuleName))
            String strName = _module.Name + _CurTable; // later add user or Group             
            

            if (objGridResultColumnDisplayController.IsExistByName(strName))
            {
                DataSet dsColumns = objGridResultColumnDisplayController.GetGridResultColumnDisplaysByName(strName);
                foreach (DataRow rowColumn in dsColumns.Tables[0].Rows)
                {
                    STGridResultColumnDisplaysInfo objGridResultColumnDisplayInfo = (STGridResultColumnDisplaysInfo)objGridResultColumnDisplayController.GetObjectFromDataRow(rowColumn);
                    AAColumnAliasController objAAColumnAliasController = new AAColumnAliasController();
                    AAColumnAliasInfo objAAColumnAliasInfo = (AAColumnAliasInfo)objAAColumnAliasController.GetObjectFromDataRow(rowColumn);
                    if (objAAColumnAliasInfo != null)
                    {
                        try
                        {
                            fld_dgvSearchResults.Columns[objGridResultColumnDisplayInfo.STGridResultColumnFieldName].Caption = objGridResultColumnDisplayInfo.STGridResultColumnCaption;
                            fld_dgvSearchResults.Columns[objGridResultColumnDisplayInfo.STGridResultColumnFieldName].VisibleIndex = objGridResultColumnDisplayInfo.STGridResultSortOrder;
                            fld_dgvSearchResults.Columns[objGridResultColumnDisplayInfo.STGridResultColumnFieldName].Width = objGridResultColumnDisplayInfo.STGridResultColumnWidth;
                            CountvisibleColumns++;
                        }
                        catch(Exception)
                        {}
                    }
                    else
                    {
                        String strMessage = "#Message: Alias:"+
                            objGridResultColumnDisplayInfo.STGridResultColumnFieldName;
                        MessageBox.Show(strMessage);
                    }
                }              
            }


        }
        #endregion

        private void fld_dgvSearchResults_DoubleClick(object sender, EventArgs e)
        {
            
            //String strclicked = fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[0]).ToString();

            //Get Primary Column value,  change, 09.08.2007
            String strPrimaryColumn =  THSDbUtil.GetTablePrimaryColumn(ObjectSearchName);
            String strclicked = fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[strPrimaryColumn]).ToString();
            int iSearchObjectID = Convert.ToInt32(strclicked);


            if (Module.Controls[SearchControlName].GetType() == typeof(DevExpress.XtraEditors.TextEdit))
            {
                Module.Controls[SearchControlName].Text = strclicked;
            }
            else if (Module.Controls[SearchControlName].GetType() == typeof(DevExpress.XtraEditors.LookUpEdit))
            {
                ((DevExpress.XtraEditors.LookUpEdit)Module.Controls[SearchControlName]).EditValue = iSearchObjectID;
            }           

            this.Close();
        }

        
        private void UpdateSearch()
        {

            BaseBusinessController objBusinessController = BusinessControllerFactory.GetBusinessController(ObjectSearchName + "Controller");
            PropertyInfo[] properties = SearchObject.GetType().GetProperties();
            int maxRecs = Convert.ToInt32(fld_txt_maxCount.Text.ToString());
            for (int i = 0; i < properties.Length; i++)
            {
                if (properties[i].Name == "TopResults")
                {
                    //max recs  

                    properties[i].SetValue(SearchObject, maxRecs, null);
                    break;
                }

            }

            DataSet ds = objBusinessController.SearchObject(SearchObject);
            Cursor.Current = Cursors.WaitCursor;
            fld_dgcSearchResults.DataSource = ds;
            fld_dgcSearchResults.DataMember = ds.Tables[0].TableName;
            lastresultcount = ds.Tables[0].Rows.Count;
            fld_lbn_result.Text = lastresultcount.ToString();
            Cursor.Current = Cursors.Default;


        }



        private void fld_dgcSearchResults_KeyDown(object sender, KeyEventArgs e)
        {

            if (e.Control != true)
            {                               
                if (e.KeyCode == Keys.Escape)
                {
                    this.Close();
                }
                if (e.KeyCode == Keys.F7)
                {

                    fld_dgvSearchResults.ClearColumnsFilter();
                    fld_dgvSearchResults.ClearSorting();
                    fld_dgvSearchResults.FocusedRowHandle = 0;
                    
                  
                    SetFocusFirstFeld();
                    ResetAll();
                }

                if (e.KeyCode == Keys.F8)
                {                    
                    DevExpress.XtraGrid.Columns.GridColumn col = new DevExpress.XtraGrid.Columns.GridColumn();
                    col = fld_dgvSearchResults.FocusedColumn;
                    fld_dgvSearchResults.ShowCustomFilterDialog(col);
                }

                if (e.KeyCode == Keys.Up)
                {
                    Object obj = new Object();

                    obj = fld_dgvSearchResults.FocusedRowHandle;

                    if (obj != null)
                    {
                        int index = fld_dgvSearchResults.FocusedRowHandle;
                        {
                            if (index == 0)
                            {
                                SendKeys.SendWait("^{UP}");
                            }
                        }
                    }                   
                }


                if (e.KeyCode == Keys.Enter)
                {
                    String strPrimaryColumn = THSDbUtil.GetTablePrimaryColumn(ObjectSearchName);

                    if (fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[strPrimaryColumn]) == null)
                    {

                        if (ModusEnter == true)
                        {
                            //gold UpdateSearch();
                        }

                        return;
                    }


                    if (Module.Controls[SearchControlName].GetType() == typeof(DevExpress.XtraEditors.TextEdit))
                    {
                        //int iSearchObjectID = (int)fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[0]);
                        //int iSearchObjectID = Convert.ToInt32(fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[0]));
                        //Get Primary Column value, change,09.08.2007
                        int iSearchObjectID = Convert.ToInt32(fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[strPrimaryColumn]));
                        Module.Controls[SearchControlName].Text = iSearchObjectID.ToString();
                    }
                    else if (Module.Controls[SearchControlName].GetType() == typeof(DevExpress.XtraEditors.LookUpEdit))
                    {


                        //String tmpstr = fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[0]).ToString();

                        //Get Primary Column value, change,09.08.2007
                        String tmpstr = fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, fld_dgvSearchResults.Columns[strPrimaryColumn]).ToString();
                        int iSearchObjectID = Convert.ToInt32(tmpstr);

                        //int iSearchObjectID =(int)fld_dgvSearchResults.GetRowCellValue(fld_dgvSearchResults.FocusedRowHandle, colObjectNumber).ToString();
                        ((DevExpress.XtraEditors.LookUpEdit)Module.Controls[SearchControlName]).EditValue = iSearchObjectID;

                    }
                   
                    this.Close();

                }

            }
        }

        private void guiSearch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
            }
        }

        private void AddAllColumnsToGridViewResults(DevExpress.XtraGrid.Views.Grid.GridView GridViewResults, String strTableName)
        {
            // add all columns und hide it
            GridViewResults.Columns.Clear();
            
            //Column Primary Column
            String strPrimaryColumn = THSDbUtil.GetTablePrimaryColumn(strTableName);
            AAColumnAliasController objAAColumnAliasController = new AAColumnAliasController();
            DataSet dsColumns = objAAColumnAliasController.GetAAColumnAliasByTableName(strTableName);
            if (dsColumns.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow rowColumn in dsColumns.Tables[0].Rows)
                {
                    AAColumnAliasInfo objAAColumnAliasInfo = (AAColumnAliasInfo)objAAColumnAliasController.GetObjectFromDataRow(rowColumn);
                    if (objAAColumnAliasInfo != null)
                    {
                        DevExpress.XtraGrid.Columns.GridColumn col = new DevExpress.XtraGrid.Columns.GridColumn();
                        col.Name = "col" + objAAColumnAliasInfo.AAColumnAliasName;
                        col.FieldName = objAAColumnAliasInfo.AAColumnAliasName;
                        col.Caption = objAAColumnAliasInfo.AAColumnAliasCaption;
                        col.Width = 100;
                        col.VisibleIndex = -1;
                        if (col.FieldName.Contains("MatchCode"))
                        {
                            String strText = ADConfigValueUtility.GetTextFromKey(col.FieldName);
                            if (strText != string.Empty)
                                col.Caption = strText.ToString();
                        }
                        GridViewResults.Columns.Add(col);
                    }

                }
            }
            else
            {               

                DevExpress.XtraGrid.Columns.GridColumn colPrimaryColumn = new DevExpress.XtraGrid.Columns.GridColumn();
                colPrimaryColumn.Name = "col" + strPrimaryColumn;
                colPrimaryColumn.FieldName = strPrimaryColumn;
                colPrimaryColumn.Caption = "ID";
                colPrimaryColumn.VisibleIndex = -1;
                GridViewResults.Columns.Add(colPrimaryColumn);
                

                //Column Name
                DevExpress.XtraGrid.Columns.GridColumn colName = new DevExpress.XtraGrid.Columns.GridColumn();
                colName.Name = "col" + strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "Name";
                colName.FieldName = strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "Name";
                colName.Caption = "Name";
                colName.VisibleIndex = -1;
                GridViewResults.Columns.Add(colName);

                //Column Desc
                DevExpress.XtraGrid.Columns.GridColumn colDesc = new DevExpress.XtraGrid.Columns.GridColumn();
                colDesc.Name = "col" + strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "Desc";
                colDesc.FieldName = strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "Desc";
                colDesc.Caption = "Bezeichnung";
                colDesc.VisibleIndex = -1;
                GridViewResults.Columns.Add(colDesc);

                //Column MC1
                DevExpress.XtraGrid.Columns.GridColumn colMC1 = new DevExpress.XtraGrid.Columns.GridColumn();
                colMC1.Name = "col" + strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "MatchCode01Combo";
                colMC1.FieldName = strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "MatchCode01Combo";
                colMC1.Caption = "MC 1";
                String strMC1Text = ADConfigValueUtility.GetTextFromKey(strPrimaryColumn.Substring(2, strPrimaryColumn.Length - 4) + "MatchCode01");
                if (strMC1Text != null)
                    colMC1.Caption = strMC1Text.ToString();
                colMC1.VisibleIndex = -1;
                GridViewResults.Columns.Add(colMC1);

                //Column MC2
                DevExpress.XtraGrid.Columns.GridColumn colMC2 = new DevExpress.XtraGrid.Columns.GridColumn();
                colMC2.Name = "col" + strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "MatchCode02Combo";
                colMC2.FieldName = strPrimaryColumn.Substring(0, strPrimaryColumn.Length - 2) + "MatchCode02Combo";
                colMC2.Caption = "MC 2";
                String strMC2Text = ADConfigValueUtility.GetTextFromKey(strPrimaryColumn.Substring(2, strPrimaryColumn.Length - 4) + "MatchCode02");
                if (strMC1Text != null)
                    colMC1.Caption = strMC2Text.ToString();
                colMC2.VisibleIndex = -1;
                GridViewResults.Columns.Add(colMC2);
            }

            //Add Primary column to grid if not exist in grid
            if (GridViewResults.Columns[strPrimaryColumn] == null)
            {
                DevExpress.XtraGrid.Columns.GridColumn colPrimaryColumn = new DevExpress.XtraGrid.Columns.GridColumn();
                colPrimaryColumn.Name = "col" + strPrimaryColumn;
                colPrimaryColumn.FieldName = strPrimaryColumn;
                colPrimaryColumn.Caption = "ID";
                colPrimaryColumn.VisibleIndex = -1;
                GridViewResults.Columns.Add(colPrimaryColumn);
            }            
        }

        private void fld_btn_saveColumn_Click(object sender, EventArgs e)
        {
            if (fld_dgcSearchResults != null)
            {
                String strName = _module.Name + _CurTable; // later add user or Group 
                STGridResultColumnDisplaysController objSTGridResultColumnDisplaysController = new STGridResultColumnDisplaysController();
                objSTGridResultColumnDisplaysController.DeleteGridResultColumnDisplayByName(strName);

                String strFirstColumnFieldName=String.Empty;

                foreach (DevExpress.XtraGrid.Columns.GridColumn GridColumn in ((DevExpress.XtraGrid.Views.Grid.GridView)((DevExpress.XtraGrid.GridControl)fld_dgcSearchResults).ViewCollection[0]).Columns)
                {
                    if (GridColumn.Visible)
                    {
                        if(GridColumn.VisibleIndex==0)
                            strFirstColumnFieldName=GridColumn.FieldName;

                        STGridResultColumnDisplaysInfo objSTGridResultColumnDisplaysInfo = new STGridResultColumnDisplaysInfo();
                        objSTGridResultColumnDisplaysInfo.STGridResultColumnName = GridColumn.Name;
                        objSTGridResultColumnDisplaysInfo.STGridResultColumnFieldName = GridColumn.FieldName;
                        objSTGridResultColumnDisplaysInfo.STGridResultColumnCaption = GridColumn.Caption;
                        objSTGridResultColumnDisplaysInfo.STGridResultColumnWidth = GridColumn.Width;
                        objSTGridResultColumnDisplaysInfo.STModuleID = 0;
                        objSTGridResultColumnDisplaysInfo.STGridResultSortOrder = GridColumn.VisibleIndex;
                        objSTGridResultColumnDisplaysInfo.STGridByName = strName;
                        objSTGridResultColumnDisplaysController.CreateObject(objSTGridResultColumnDisplaysInfo);
                    }
                }                
                MessageBox.Show("Lưu cột của bảng danh sách thành công", "#Cảnh báo#", MessageBoxButtons.OK, MessageBoxIcon.Information);
                
            }

        }

        private void fld_btn_customize_Click(object sender, EventArgs e)
        {
            fld_dgvSearchResults.ColumnsCustomization();
        }

        private void fld_dgvSearchResults_ColumnFilterChanged(object sender, EventArgs e)
        {


            if (GetLenFromSearchFields() == 0)
            {
                // Reset
                //ResetAll();
            }

            String ColID = ((DevExpress.XtraGrid.Views.Grid.GridView)(sender)).FocusedColumn.FieldName;
            String SearchValue = "";
            if (fld_dgvSearchResults.Columns[ColID].FilterInfo.Value != null)
            {
                SearchValue = fld_dgvSearchResults.Columns[ColID].FilterInfo.Value.ToString();
            }

            // check all searchfield and return then len


            if (ModusEnter == false)
            {
                if ((lastresultcount > DefaultTopResults) || (lastresultcount == 0))
                {
                    // updateSql


                    PropertyInfo[] properties = SearchObject.GetType().GetProperties();
                    for (int i = 0; i < properties.Length; i++)
                    {
                        if (properties[i].Name == ColID)
                        {
                            properties[i].SetValue(SearchObject, SearchValue, null);
                            break;
                        }

                    }
                        UpdateSearch();

                }

            }
            else
            {
                    PropertyInfo[] properties = SearchObject.GetType().GetProperties();
                    for (int i = 0; i < properties.Length; i++)
                    {
                        if (properties[i].Name == ColID)
                        {
                            properties[i].SetValue(SearchObject, SearchValue, null);
                            break;
                        }

                    }
                }
            
            

        }

        private int GetLenFromSearchFields()
        {
            string strAll = "";
            for (int i = 0; i < fld_dgvSearchResults.Columns.Count; i++)
            {
                if (fld_dgvSearchResults.Columns[i].VisibleIndex > -1)
                {
                    if (fld_dgvSearchResults.Columns[i].FilterInfo.Value != null)
                    {
                        strAll = strAll + fld_dgvSearchResults.Columns[i].FilterInfo.Value.ToString();
                    }

                }

            }

            return (strAll.Length);
        }

        private void ResetAll()
        {
            lastresultcount = 0;
            fld_lbn_result.Text = "0";
            fld_dgcSearchResults.DataSource = null;
            SetSearchObject();
            return;

        }

        private void SetFocusFirstFeld()
        {
            fld_dgcSearchResults.Focus();
            SendKeys.SendWait("^{UP}");
            for (int i = 0; i < CountvisibleColumns; i++)
                SendKeys.SendWait("{LEFT}");

            SendKeys.SendWait("{F2}");

            if (_Vorgabe != "")
                SendKeys.SendWait(_Vorgabe);



        }

        private void guiSearch_Activated(object sender, EventArgs e)
        {
            if (OpenFirst)
            {
                OpenFirst = false;
                SetFocusFirstFeld();

            }
        }

        private void fld_dgvSearchResults_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (ModusEnter == true)
                {
                    UpdateSearch();
                }

            }
        }

        private void guiSearch_Resize(object sender, EventArgs e)
        {
            Control control = (Control)sender;

            int Height = fld_dgcSearchResults.Size.Height;
            fld_dgcSearchResults.Size = new Size(control.Size.Width - 20, Height);

        }

        #region CustomFilterdialog

        private void fld_dgvSearchResults_CustomFilterDialog(object sender, DevExpress.XtraGrid.Views.Grid.CustomFilterDialogEventArgs e)
        {

            DevExpress.XtraGrid.Filter.FilterCustomDialog dlg = new DevExpress.XtraGrid.Filter.FilterCustomDialog(e.Column);
            dlg.Text = "Spezielle Suche";
            GermanControl(dlg);
            dlg.ShowDialog();
            e.FilterInfo = null;
            e.Handled = true;

        }
        private void GermanControl(Control ctrl)
        {
           
            if (filterDic == null)
            {
                filterDic = new System.Collections.Specialized.ListDictionary();
                filterDic.Add("", "");
                filterDic.Add("Gleich =", "equals");
                filterDic.Add("Ungleich <>", "does not equal");
                filterDic.Add("Grösser als >", "is greater than");
                filterDic.Add("Grösser und Gleich als >=", "is greater than or equal to");
                filterDic.Add("Kleiner als <", "is less than");
                filterDic.Add("Kleiner und Gleich als  <=", "is less than or equal to");
                filterDic.Add("NULL", "blanks");
                filterDic.Add("Nicht NULL", "non blanks");
                filterDic.Add("Wie", "like");
                filterDic.Add("Nicht Wie", "not like");
            }
            Control child = GetChildControlByName(ctrl.Controls, "btnCancel");
            if (child != null)
                child.Text = "Abbrechen";
            child = GetChildControlByName(ctrl.Controls, "btnOK");
            if (child != null)
                child.Text = "OK";
            child = GetChildControlByName(ctrl.Controls, "rbOr");
            if (child != null)
                child.Text = "Oder";
            child = GetChildControlByName(ctrl.Controls, "rbAnd");
            if (child != null)
                child.Text = "Und";
            child = GetChildControlByName(ctrl.Controls, "label1");
            if (child != null)
                child.Text = "Filter";
            child = GetChildControlByName(ctrl.Controls, "piFirst");
            if (child != null)
                GermanComboEdit(child);
            child = GetChildControlByName(ctrl.Controls, "piSecond");
            if (child != null)
                GermanComboEdit(child);
        
             }
        private void GermanComboEdit(Control ctrl)
        {
            DevExpress.XtraEditors.ComboBoxEdit newc = new DevExpress.XtraEditors.ComboBoxEdit();
            newc.Name = ctrl.Name + "clone";
            ctrl.Parent.Controls.Add(newc);
            newc.Location = ctrl.Location;
            newc.Size = ctrl.Size;
            ctrl.Visible = false;
            newc.Tag = ctrl;
            newc.Visible = true;
            DevExpress.XtraEditors.Controls.ComboBoxItemCollection coll = newc.Properties.Items;
            foreach (System.Collections.DictionaryEntry de in filterDic)
            {
                coll.Add(de.Key);
            }
            newc.SelectedIndex = (ctrl as DevExpress.XtraEditors.ComboBoxEdit).SelectedIndex;
            newc.SelectedIndexChanged += new System.EventHandler(SelectedIndexChanged);
        }
        private Control GetChildControlByName(Control.ControlCollection cc, String sname)
        {
            Control cl = null;
            foreach (Control ctrl in cc)
            {
                if ((cl == null) && sname.Equals(ctrl.Name))
                    cl = ctrl;
                else if (ctrl.HasChildren)
                    cl = GetChildControlByName(ctrl.Controls, sname);

                if (cl != null) break;
            }
            return cl;
        }
        private void SelectedIndexChanged(object sender, System.EventArgs e)
        {
            DevExpress.XtraEditors.ComboBoxEdit newc = sender as DevExpress.XtraEditors.ComboBoxEdit;
            DevExpress.XtraEditors.ComboBoxEdit cc = newc.Tag as DevExpress.XtraEditors.ComboBoxEdit;
            cc.SelectedIndex = newc.SelectedIndex;
        }

        #endregion

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(guiSearch));
            this.SuspendLayout();
            // 
            // guiSearch
            // 
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "guiSearch";
            this.ResumeLayout(false);

        }

    }
}